import React from 'react';
import ReactDOM from 'react-dom';
import singleSpaReact from 'single-spa-react';
import App from './page/App';
import { appRegister } from '../../config/appServies'

const domElementGetter = () => document.getElementById(appRegister.reactApp.id)

const reactLifecycles = singleSpaReact({
    React,
    ReactDOM,
    rootComponent: App,
    domElementGetter,
})

export const bootstrap = (props) => {
    console.log('应用注册附属参数', props)
    return reactLifecycles.bootstrap(props)
}

export const mount = [
    reactLifecycles.mount
];

export const unmount = [
    reactLifecycles.unmount
];